package com.smallframework.demo.service;

import com.smallframework.demo.dao.UserDao;
import com.smallframework.demo.domain.User;
import com.smallframework.mvc.Component;
import com.smallframework.mvc.Inject;

/**
 * Created by tan on 2017/7/3.
 */
@Component
public class UserService {
	@Inject
	private UserDao userDao;

	public void createUser() {
		userDao.save();
	}

	public void createUser(String name, int age) {
		User user = new User();
		user.setName(name);
		user.setAge(age);
		userDao.save(user);

		System.out.println(user.toString());
	}
}
